// let arr = ["后盾人", "hdcms", 'hello'];
// let hd = ["houdunren"];

// console.log(arr)

// console.log('-----------------------\n')

// console.log(delete arr[1])
// console.log(arr)
// console.log(arr[1], typeof arr[1])

    //获取价格超过1万元商品的名称
    let cart = [
      { name: "iphone", price: 12000 },
      { name: "imac", price: 25000 },
      { name: "ipad", price: 3600 }
    ];
    function getNameByPrice(goods, price) {
      return goods
        .reduce(function(arr, cur) {
          if (cur.price > price) arr.push(cur.name);
          return arr;
        }, [])
    }
    console.table(getNameByPrice(cart, 10000));